import { defineStore } from 'pinia'
import { ref } from 'vue'

export const usePreviewStore = defineStore('preview', () => {
	const classList = ref([])
	
	const setClassList = (data) => {
		classList.value = data
	}
	
	return {
		setClassList,
		classList
	}
},{
	persist:{
		 storage: {
		      getItem: (key) => uni.getStorageSync(key),  // 使用箭头函数传递参数
		      setItem: (key, value) => uni.setStorageSync(key, value)
		}
	}
})